package UserInterface;

import java.awt.Container;

import javax.swing.*;

import acounts.Currency;
import javax.swing.GroupLayout.Alignment;
import java.awt.Font;
import java.awt.Color;

public class InputMoneyMaintanance extends JPanel{
	  Container box=Box.createVerticalBox();
	  ButtonGroup radioGroup = new ButtonGroup();
	  private JRadioButton radioButton_1;
	  private JRadioButton radioButton_2;
	  private void makeContainer(){
	        JRadioButton radioButton;
	        JLabel lblChooseCurrency = new JLabel("Choose currency: ");
	        lblChooseCurrency.setForeground(new Color(128, 0, 0));
	        lblChooseCurrency.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 18));
	        box.setBackground(new Color(255, 248, 220));
	        box.add(lblChooseCurrency);
	        radioGroup.add(radioButton=new JRadioButton(Currency.UAN.toString()));
	        radioButton.setBackground(new Color(255, 248, 220));
	        radioButton.setFont(new Font("Tahoma", Font.BOLD, 14));
	        radioButton.setActionCommand(Currency.UAN.toString());
	        radioButton.setSelected(true);
	        box.add(radioButton);
	        radioGroup.add(radioButton_1=new JRadioButton(Currency.USD.toString()));
	        radioButton_1.setBackground(new Color(255, 248, 220));
	        radioButton_1.setFont(new Font("Tahoma", Font.BOLD, 14));
	        radioButton_1.setActionCommand(Currency.USD.toString());
	        box.add(radioButton_1);
	        radioGroup.add(radioButton_2=new JRadioButton(Currency.EUR.toString()));
	        radioButton_2.setBackground(new Color(255, 248, 220));
	        radioButton_2.setFont(new Font("Tahoma", Font.BOLD, 14));
	        radioButton_2.setActionCommand(Currency.EUR.toString());
	        box.add(radioButton_2);
	        
	        
	  }
	public  InputMoneyMaintanance(){
		setBackground(new Color(255, 248, 220));
		  makeContainer();
		  GroupLayout groupLayout = new GroupLayout(this);
		  groupLayout.setHorizontalGroup(
		  	groupLayout.createParallelGroup(Alignment.LEADING)
		  		.addGroup(groupLayout.createSequentialGroup()
		  			.addComponent(box, GroupLayout.PREFERRED_SIZE, 196, GroupLayout.PREFERRED_SIZE)
		  			.addContainerGap(86, Short.MAX_VALUE))
		  );
		  groupLayout.setVerticalGroup(
		  	groupLayout.createParallelGroup(Alignment.LEADING)
		  		.addGroup(groupLayout.createSequentialGroup()
		  			.addComponent(box, GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
		  			.addGap(22))
		  );
		  setLayout(groupLayout);
		//this.setSize(100,100);
		  this.setVisible(true);
		  
	  }

}
